package com.rop.znyx.activity;


import com.rop.znyx.common.result.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA
 * User: Rop
 * Date: 2023/7/21
 * Time: 8:53
 * Description:
 */

@FeignClient("service-activity")
public interface ActivityFeignClient {

    /**
     * 根据skuId列表获取促销信息
     */
    @PostMapping("api/activity/inner/findActivity")
    Result<Map<Long, List<String>>> findActivity(@RequestBody List<Long> skuIdList);

    @ApiOperation(value = "根据skuId获取促销与优惠券信息")
    @GetMapping("api/activity/inner/findActivityAndCoupon/{skuId}/{userId}")
    Result<Map<String, Object>> findActivityAndCoupon(@PathVariable Long skuId, @PathVariable("userId") Long userId);
}
